﻿using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AcDotNetTool;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.Colors;
namespace _03编辑图形
{
    public class ColorExam
    {
        [CommandMethod("EditDemo")]
        public void EditDemo()
        {
            Database db = HostApplicationServices.WorkingDatabase;
            //db.AddCircleModelSpace(new Point3d(100, 100, 0), 50);
            Circle c1 = new Circle(new Point3d(100, 100, 0), new Vector3d(0,0,1),50);
            Circle c2 = new Circle(new Point3d(200, 100, 0), new Vector3d(0, 0, 1), 50);
            
            db.AddEnityToModelSpace(c1);

            c1.ChangeEntityColor(1);
            c2.ChangeEntityColor(6);

            db.AddEnityToModelSpace(c2);
            
        }

      
    }
}
